﻿
namespace IniFileManager
{
	/// <summary>
	/// Class of elements containing "unsigned" value.
	/// </summary>
	sealed public class IniUnsignedElement : IniValueElement
	{
		private ulong value;

		/// <summary>
		/// Constructor of IniUnsignedElement.
		/// </summary>
		/// <param name="value">Value which is stored in element.</param>
		public IniUnsignedElement( ulong value )
		{
			this.value = value;
		}

		internal static IniElement Parse( string value )
		{
			return new IniUnsignedElement( ulong.Parse( value ) );
		}

		/// <summary>
		/// Gets or sets value stored in element.
		/// </summary>
		public override object Value
		{
			get
			{
				return this.value;
			}
			set
			{
				this.value = (ulong)value;
			}
		}
	}
}
